"""
Author : sunshicheng
DateTime : 2021/4/14.9:08 上午
FileName : file_upload.py
Desc:  接口上传文件
"""

import requests
from config.user_token import Token
from config.base_info import Static_info as si


def up_file():
    file_data = {'wxComplaintFile': ('0118.xlsx', open('/Users/sunshicheng/Desktop/0118.xlsx', 'rb'))}
    token = Token('18226287291')
    headers = token.test_token()
    response = requests.post(si.env['test']+si.inter['saas']['upload_file'], files=file_data, headers=headers)
    print(response.text)


if __name__ == '__main__':
    up_file()
